home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 12 / Mac Magazin and MacEasy Magazine CD - Issue 12.iso / Sharewarebibliothek / Anwendungen / Rest / Soon4.7.1.sit 1 folder / Soon Doc < prev    next >
Text File  |  1995-06-25  |  12KB  |  207 lines

  1. =-=-=-=-=-=-=-=-=
  2. Welcome to Soon4!
  3. =-=-=-=-=-=-=-=-=
  4.  
  5. A little calendar program which also tells you a lot about the sun and the moon
  6. (hence the name: Soon - Sun & Moon)…
  7.  
  8. Soon started out as a fun project and was first posted to macgifts as "Soon3".
  9. Thanks to Anders Eklof from Sweden it now comes in a "professional" version
  10. "Soon4"!
  11. Soon3 (and it's predecessors) used an algorithm which was an approximation for
  12. the sunrise/-set time. I found it in some programmable pocket-calculator's
  13. manual. It worked perfect for my location and my needs - but apparently nowhere
  14. else! <:)
  15.  
  16. So I started to rewrite it (almost) completey from scratch. Only the output
  17. somewhat resembles earlier versions. It's a completely new and correct algorithm
  18. now, which should run no matter where you are on planet earth (according to
  19. the astronomer's book I've taken it from…). It's deviation for the sun-times is
  20. not more than one minute, for the moon-times not more than 4 and for the moon
  21. data (phase, age) it's less than 0.3° between the years 1950-2050!
  22. The "phrase" for the 4 moonphases is used within an interval of +/- 7 degr. of
  23. the precise value to give a better "synchronization" with diaries etc…
  24. The other 4 "phrases" are valid between those 4 just mentioned…
  25.  
  26. position° interval° phase-phrase
  27. --------------------------------
  28.  0/360    354-  6   newmoon
  29.              7- 83   waxing crescent
  30.    90      84- 96   1st quarter (halfmoon, waxing)
  31.               97-173   waxing gibbous
  32.   180     174-186   fullmoon
  33.           187-263   waning gibbous
  34.   270     264-276   last quarter (halfmoon, waning)
  35.           277-353   waning crescent
  36.           
  37. The days of the moonphase and the degrees of the moonterminator are not rounded
  38. in any way and show the exact values!
  39.  
  40.  
  41. What Soon4 shows you:
  42. ---------------------
  43.  
  44. 1. The weekday and date in "long form". The date format cen be set with STR-
  45.    resource #7 (see below). a "0" indicates MM/DD/YYYY, a "1" means DD.MM.YYYY
  46. 2. How many days are gone so far and how many are left this year, including
  47.    automatic leapyear detection
  48. 3. The current location and timezone including automatic DST detection.
  49.    They can be changed using either the "Set" button (see below) or any resource
  50.    editor - look in the STR resource of the "Soon Settings" file, they're named
  51.    and pretty self-explanatory.
  52.    The only exception is STR-resource #6 (DST-Mode), which musn't have any other
  53.    value than 0, 1 or 2! A value of 0 means DST is never in effect (e.g. in
  54.    Arizona), 1 or 2 select the two types of DST (see below in the paragraph
  55.    about DST)…
  56.    NOTE: Longitudes east from 0° are negative, as well as latitudes south from
  57.          the equator! The difference in hours from GMT also has to be prefixed
  58.          with a "-" if you're west from 0° (don't add another hour for DST here,
  59.          see explanation below…). The strings for the TimeZone are totally up to
  60.          you. Use whatever form you want to (CET, [GTM], (PST), EST/DST …)
  61. 4. Three different twilights:
  62.    The astronomical - starts/ends when the sun is 18° below horizon. That's
  63.    when no more daylight's left at all…
  64.    The nautical - 12° below horizon. Used for naval purposes, starts when the
  65.    brightest stars come out…
  66.    The civil - 6° below horizon. Ends when there just not enough light left for
  67.    work (traditional, that is :)
  68. 4.1 If you're beyond the polar circle (north or south) you're also noticed about
  69.     the polar night and the midnight sun…
  70. 5. Sunrise and -set times. Exact sunset is when the sun reaches the horizon (dis-
  71.    tance from zenith = 90°). But this is not what you are able to observe!
  72.    Due to refraction the sun appears elevated by more than its diameter (34 rad
  73.    minutes). This means if you can see the sun just hitting the horizon,
  74.    it's actually set already (geometrically speaking)…! The sun times given by
  75.    Soon tell the "visual" sunrise and -set (i.e. what you can see) using a ze-
  76.    nith distance of 90°50' (90.83_). 50'=34'(refraction)+16'(sun's radius)…
  77. 6. The moonphase with it's exact days, the position of the moonterminator and
  78.    a common phrase of the actual phase taking in account the current time (this
  79.    information is _not_ updated!). When you log this data to a file, these
  80.    values are for 12:00 o'clock (noon)…
  81. 7. Two analog clocks:
  82.    - Upper clock, which is a 24 hours analog clock. i.e. the hours are
  83.      positioned as follows:  00
  84.                            18  06
  85.                              12
  86.      it shows the start/end of daytime/nighttime (dt/nt) according to the sun-
  87.      rise/-set hours. The black part is "pure" night, using the astronomical
  88.      twilight hours while the grey parts are the twilight until the sun rises
  89.      or sets. This gives you a graphical impression of how much day-/nighthours
  90.      and twilight (getting less the closer you come to the equator) you have
  91.      that day…
  92.    - Lower clock - is a "usual" 12 hours analog clock. It's updated every second
  93.      and shows you the current time…
  94. 7.1 A graphic of the current moonphase - just as in every diary…
  95. 8. The buttons:
  96.    - The "Set" button, prompts the user for location/timezone data. First the
  97.      current settings are diplayed and you're asked if you want to change them.
  98.      If so, your prompted for each new value. Note the "-" prefixes on eastern
  99.      longitudes, southern latitudes and the time difference west from GMT! A
  100.      rough sanity check is done on this but it could be wrong on +/- 1 hour.
  101.      This information is stored in a seperate file called "Soon Settings", which
  102.      has to reside in the same folder as Soon does! If it's missing, Soon uses
  103.      it's default data (my home location) and when you set yours, a "Soon
  104.      Settings" file is created (in the same folder where Soon is in) and used
  105.      from then on. (Of course, if you're familiar with ResEdit, you can change
  106.      the default settings inside Soon's STR resource to your location and there-
  107.      fore no longer need the settings file!) 
  108.    - The "Log" button, prompts the user for a start and end date and writes the
  109.      data to a textfile. The data written out to the file is exactly the same as
  110.      shown in the window, except for the notification about the polar night/mid-
  111.      nitesun. I thought I could skip this in a log, because it's showing over and
  112.      over again for a couple of weeks, but if anybody wants it added, no problem!
  113.      The given dates have to be in the form YYYYMMDD, which isn't very "user 
  114.      friendly" but I didn't bother with a complex date-input/validation-routine…
  115.      If there's a big demand on this, I will however change it! Please note that
  116.      the dates are _not_ checked for integrity but if you enter "19940234" for
  117.      example, it will read "28.02., 01.03., 02.03., 03.03., 04.03." in the text
  118.      file… The only things that are checked on the entered dates are:
  119.             - no dates before 01.01.1901
  120.             - no dates after  31.12.2040
  121.             - period > 1 day
  122.      If you enter a value of 0 or any non-numerical data at either date, you'll
  123.      get straight back to the "main window"…
  124.      After you've entered valid dates, you get a window with 7 buttons. 6 of them
  125.      are "click" buttons. You can choose now, what data you want to be logged to
  126.      the file. "Everything" is the default, it gives you a complete list of every
  127.      day. When you deselect it, you have access to the other (no longer) dimmed
  128.      buttons. Check every "moon event" you want to be logged. All combinations
  129.      of these 4 are possible. Note: Logging all 4 events is _not_ the same as
  130.      logging "everything". The logfile will read only those 4 moonphases with
  131.      "gaps" between the days! When you deselect all 4 choices, these bottons dim
  132.      again and the "everything" box is checked.
  133.      The "Status line" check box is selected by default. Uncheck it if you don't
  134.      want a message added at the end of the log file about how long the compu-
  135.      tation took…
  136.      Once you've made up your mind, click in the "Do It!" button (or press the
  137.      RETURN key) and Soon will start logging the data to the file…
  138.    - The "Thank You" button, quits the program. Click on it or just press the
  139.      RETURN key. (I know, this is non-canon, the default button should be double
  140.      outlined but QB doesn't support this feature, sorry!)
  141.      
  142. All date/time calculations are based on the internal clock and DST is detected
  143. automatically.
  144. DST is active from the last Sunday in March until the last Sunday in September,
  145. almost worldwide (DSTMode=1). In the UK (and some other countries) however, it
  146. continues until the last Sunday in October. Therefore if you're in such a place,
  147. set the resource-string "DST-Mode" to 2. A value of 0 disables DST completely…
  148. I've been told (thanx, Paul Colquhoun) that on the southern hemispehre this is
  149. just reversed, i.e. DST is engaged from either September or October till March,
  150. or never at all, depending on the country. Soon checks this as well, so just
  151. select a type of DST (0/1/2)…
  152.  
  153.  
  154. Soon is written in Microsoft's QuickBasic (v1.00E-bin) and was mainly an exer-
  155. cise for me to get used to the nooks and crannies of this Basic when it comes
  156. to ToolStuff.
  157. It runs on any Mac (only under System 7?) and it comes in two versions now, one
  158. is plain 68000, the other is compiled to 68020/FPU code. If you have a math
  159. co-processor, you'll have an acceleration of about factor 2, most noticable on
  160. logfiles. Here's some benchmarks (P= plain version, F= FPU version):
  161.     P    *** Status: 31 days in    6.77 secs,  4.58 days per sec…
  162.     F    *** Status: 31 days in    3.07 secs, 10.11 days per sec…
  163.     P    *** Status: 365 days in   85.00 secs,  4.29 days per sec…
  164.     F    *** Status: 365 days in   40.92 secs,  8.92 days per sec…
  165. Of course these numbers can differ, depending on your processor and hard disk
  166. speed but they're only supposed to give you an estimation of the acceleration…
  167. (I've also noticed a slight deviation in the 4th digit of the moonterminator's
  168. fraction (E-4) of the plain version compared to the FPU version's output…)
  169.  
  170. (I've put this little program in my startup folder so that it displays it's
  171. information on every boot-up…)
  172.  
  173. ===============================================================================
  174. Since I've added many features in V4 and spent a lot of time on debugging and
  175. verification of the output, it would be nice if YOU, if you like this little
  176. pgm and want to keep it, would send me anything from $2-$5 for it… (depending
  177. on how wealthy you are and of how much use it is for you ;)
  178. If you do, please send only US-Dollars - this makes things much easier for me
  179. and don't forget to tell me your e-mail address (if any) so I can inform you
  180. on future updates. If you want to, I can also put you on a mailing-list so you
  181. get new versions sent (binhexed) straight away…
  182. Thank you for your honesty and your support of the ShareWare concept!
  183. ===============================================================================
  184.  
  185. You're welcome to send any comments, ideas, bug-reports or whatever to my email
  186. address and postcards from where you live to my snail-address!
  187.  
  188. have fun,
  189.  
  190. Christian Karpp
  191. Mundenheimer Str. 222
  192. 67061 Lu
  193. Germany
  194. chk@cider.swb.de
  195. chk@hd.ibm.de
  196.  
  197. Things in Soon "to come":
  198. -------------------------
  199. Calculation of moonrise & -set times. This is a b*tch! I've added all the
  200. needed astronomical tables and formulas but still on some days the times
  201. deviate up to 1 hour. most of the days are fine though, but I don't want to
  202. hand out "half-made" things, so be patient…! :)
  203.  
  204. I'd also like to add code for reading user's location data directly from MAP's
  205. CDEV settings. Unfortunately QB doesn't support the needed toolcall for this
  206. operation…
  207.